<template>
    <view>
        <!--<daya-footer-navbar menu_type="shuju"/>-->

        <view class="paddbottom">
            <view class="blbanner">
                <view class="b-head" :style="'border-color:' + color">{{ wm_name }}订单</view>
            </view>
            <view class="ddlb">
                <view style="border-right: 1px solid #d9d9d9">
                    <text class="num">{{ wmdd.wmnum }}</text>
                    <text class="text">今日订单量</text>
                </view>
                <view>
                    <text class="num">{{ wmdd.wm }}</text>
                    <text class="text">今日营业额（元）</text>
                </view>
            </view>
            <view class="tjlb">
                <view>
                    <text class="num">{{ wmdd.wxwmnum }}</text>
                    <text class="text">微信支付(单)</text>
                </view>
                <view>
                    <text class="num">{{ wmdd.hdwmnum }}</text>
                    <text class="text">货到付款(单)</text>
                </view>
                <view>
                    <text class="num">{{ wmdd.yuewmnum }}</text>
                    <text class="text">余额支付(单)</text>
                </view>
                <view style="border: none">
                    <text class="num">{{ wmdd.ztwmnum }}</text>
                    <text class="text">到店自提(单)</text>
                </view>
            </view>
            <view class="blbanner">
                <view class="b-head" :style="'border-color:' + color">{{ dc_name }}订单</view>
            </view>
            <view class="ddlb">
                <view style="border-right: 1px solid #d9d9d9">
                    <text class="num">{{ wmdd.dnnum }}</text>
                    <text class="text">今日订单量</text>
                </view>
                <view>
                    <text class="num">{{ wmdd.dn }}</text>
                    <text class="text">今日营业额（元）</text>
                </view>
            </view>
            <view class="tjlb">
                <view>
                    <text class="num">{{ wmdd.wxdnnum }}</text>
                    <text class="text">微信支付(单)</text>
                </view>
                <view>
                    <text class="num">{{ wmdd.chdnnum }}</text>
                    <text class="text">餐后支付(单)</text>
                </view>
                <view style="border: none">
                    <text class="num">{{ wmdd.yuednnum }}</text>
                    <text class="text">余额支付(单)</text>
                </view>
            </view>
            <view class="blbanner">
                <view class="b-head" :style="'border-color:' + color">当面付订单</view>
            </view>
            <view class="ddlb">
                <view style="border-right: 1px solid #d9d9d9">
                    <text class="num">{{ wmdd.dmnum }}</text>
                    <text class="text">今日订单量</text>
                </view>
                <view>
                    <text class="num">{{ wmdd.dm }}</text>
                    <text class="text">今日营业额（元）</text>
                </view>
            </view>
            <view class="tjlb">
                <view>
                    <text class="num">{{ wmdd.wxdmnum }}</text>
                    <text class="text">微信支付(单)</text>
                </view>
                <view style="border: none">
                    <text class="num">{{ wmdd.yuedmnum }}</text>
                    <text class="text">余额支付(单)</text>
                </view>
            </view>
        </view>
    </view>
</template>

<script>
import cardlist from '@/ymq_canyino2o/dist/cardlist/index';
import gettel from '@/ymq_canyino2o/dist/gettel/index';
var app = getApp();
export default {
    components: {
        cardlist,
        gettel
    },
    data() {
        return {
            jrdd: '0',
            jrcj: '0',
            wm_name: '',
            dc_name: '',

            wmdd: {
                wmnum: '',
                wm: '',
                wxwmnum: '',
                hdwmnum: '',
                yuewmnum: '',
                ztwmnum: '',
                dnnum: '',
                dn: '',
                wxdnnum: '',
                chdnnum: '',
                yuednnum: '',
                dmnum: '',
                dm: '',
                wxdmnum: '',
                yuedmnum: ''
            },


            color: ''
        };
    },
    onLoad: function (t) {
        var that = this;
        var n = uni.getStorageSync('sjdsjid');
        console.log(n, uni.getStorageSync('system'));
        this.setData({
            wm_name: uni.getStorageSync('system').wm_name || '外卖',
            dc_name: uni.getStorageSync('system').dc_name || '店内'
        });
        app.globalData.setNavigationBarColor(this);
        app.globalData.sjdappPageOnLoad(this);
        app.globalData.util.request({
            url: 'entry/wxapp/StoreStatistics',
            cachetime: '0',
            data: {
                store_id: n
            },
            success: function (t) {
                console.log(t.data);
                that.setData({
                    wmdd: t.data
                });
            }
        });
    },
    onReady: function () {},
    onShow: function () {},
    onHide: function () {},
    onUnload: function () {},
    onPullDownRefresh: function () {},
    onReachBottom: function () {},
    methods: {}
};
</script>
<style>
@import './sjtj.css';
</style>
